package com.demo.nacos;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;

/**
 * @author gx
 */
@SpringBootApplication
public class NacosConfigMain {

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(NacosConfigMain.class, args);

        run.getEnvironment()

        System.out.println( run.getEnvironment().getProperty("user.name") );
        System.out.println( run.getEnvironment().getProperty("user.age") );

        System.out.println( run.getEnvironment().getProperty("user-y.name") );
        System.out.println( run.getEnvironment().getProperty("user-y.age") );
    }
}

